import request from '@/router/axios';

/**
 *@param params 查询关系实体列表
 * */
export const getList = (params) => {
    return request({
        url: '/api/manager-api/mx-reference/page',
        method: 'get',
        params
    })
}

/**
 *@param params 查询关系实体
 * */
export const getDetail = (params) => {
    return request({
        url: '/api/manager-api/mx-reference/detail',
        method: 'get',
        params
    })
}

/**
 *@param data 新增关系实体
 * */
export const add = (data) => {
    return request({
        url: '/api/manager-api/mx-reference/create',
        method: 'post',
        data
    })
}

/**
 *@param params 删除关系实体
 * */
export const del = (params) => {
    return request({
        url: '/api/manager-api/mx-reference/deleteByIds',
        method: 'post',
        params
    })
}

/**
 *@param params 作废关系实体
 * */
export const cancellation = (params) => {
    return request({
        url: '/api/manager-api/mx-reference/discard',
        method: 'post',
        params
    })
}

/**
 *@param params 发布关系实体
 * */
export const issue = (params) => {
    return request({
        url: '/api/manager-api/mx-reference/publish',
        method: 'post',
        params
    })
}

/**
 *@param data 修改关系实体
 * */
export const update = (data) => {
    return request({
        url: '/api/manager-api/mx-reference/update',
        method: 'post',
        data
    })
}

/**
 *@param params 获取关系实体父模型
 * */
export const getFatherModules = (params) => {
    return request({
        url: '/api/manager-api/mx-reference/latestReleaseListIncludedBaseObject',
        method: 'get',
        params
    })
}

/**
 *@param params 获取关系实体
 * 抽屉中使用
 * */
export const getRelation = (params) => {
    return request({
        url: '/api/manager-api/mx-reference/extendRefenrence',
        method: 'get',
        params
    })
}


/**
 *@param params 检出
 * */
export const checkout = (params) => {
    return request({
        url: '/api/manager-api/mx-reference/checkout',
        method: 'post',
        params
    })
}

/**
 *@param params 修订
 * */
export const revise = (params) => {
    return request({
        url: '/api/manager-api/mx-reference/amendment',
        method: 'post',
        params
    })
}


/**
 *
 * @param  params 检入实体
 */
export const checkin = (params) => {
    return request({
        url: '/api/manager-api/mx-reference/checkin',
        method: 'post',
        params
    })
}

/**
 *
 * @param  params 撤销检出实体
 */
export const revokeCheckout = (params) => {
    return request({
        url: '/api/manager-api/mx-reference/revokeCheckout',
        method: 'post',
        params
    })
}

/**
 *@param params  获取from 和 to 实体
 * */
export const from_to = (params) => {
    return request({
        url: '/api/manager-api/mx-type/latestReleaseListIncludedBaseObject',
        method: 'get',
        params
    })
}


/**
 * @param params
 * 查询当前功能配置内容 生命周期
 * */
export const getLifeCon = (params) => {
    return request({
        url: '/api/manager-api/mx-reference/listLifeCycleByReference',
        method: 'get',
        params
    })
}
